#include "xml_format.h"
#include <sstream>
#include "log_util.h"
using namespace std;


std::string XmlFormat::Format(
	const std::string& level,
	const std::string& log,
	const std::string& file,
	int line
) {
	LogUtil logutil;
	stringstream ss;
	ss << "<log><text>"
		<< logutil.GetNow()
		<<"</text><text>"
		<< level
		<< "</text><text>"
		<< log
		<< "</text><text>"
		<< file
		<< "</text><text>"
		<< line
		<< "</text></log>" << endl;

	return ss.str();
}